package com.wangnan.currentactivity.Dao;

import android.app.Application;

import java.util.List;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;

/*
 * Package    :com.wangnan.currentactivity.Dao
 * ClassName  :BillListViewModel
 * Description:
 * Data       :2021/1/31/031 10:56
 */
public class BillListViewModel extends AndroidViewModel {

	public  BillListDao        billListDao;
	public  BillListRepository billListRepository;

	public BillListViewModel(@NonNull Application application) {
		super(application);
		billListRepository = new BillListRepository(application);
	}

	public LiveData<List<BillList>> getAllBillListLive() {
		return billListRepository.getAllbillListsLive();
	}

	public void insertBillLists(BillList... billLists) {
		billListRepository.insertBillLists(billLists);
	}

	public void updateBillLists(BillList... billLists) {
		billListRepository.updateBillLists(billLists);
	}

	public void deleteBillLists(BillList... billLists) {
		billListRepository.deleteBillLists(billLists);
	}

	public void deleteAllBillLists(BillList... billLists) {
		billListRepository.deleteAllBillLists();
	}
}